import axios from '@/libs/api.request'

/**
 * 散点图数据
 * @return {[type]}        [description]
 */
export const findList = (params) => {
  return axios.request({
    url: '/api/cycle/findList',
    method: 'get',
    params
  })
}

/**
 * 柱状图数据
 * @return {[type]}        [description]
 */
export const barLine = () => {
  return axios.request({
    url: '/api/cycle/getCycleCountGroupByPeriod',
    method: 'get'
  })
}

/**
 * 获取雷达图数据
 * @return {[type]}        [description]
 */
export const radarInfo = () => {
  return axios.request({
    url: '/api/cycle/getPeriodByGasClass',
    method: 'get'
  })
}

/**
 * 表具详情
 * @return {[type]}        [description]
 */
export const meterDetail = (id) => {
  return axios.request({
    url: '/api/cycle/getMeterDetail/' + id,
    method: 'get'
  })
}

/**
 * 获取用气性质
 * @return {[type]}        [description]
 */
export const meterGasClass = () => {
  return axios.request({
    url: '/api/meterManage/params/getMeterGasClass',
    method: 'get'
  })
}

/**
 * desc: 请求矩形树图数据
 * param {type}
 * return: void
 */
export const getTreemapData = (params) => {
  return axios.request({
    url: '/api/cycle/getMeterCountByGasClass',
    method: 'get',
    params
  })
}

/**
 * desc: 请求矩形树图数据
 * param {type}
 * return: void
 */
export const getTableDataByGasNature = (params) => {
  return axios.request({
    url: '/api/cycle/getMeterPagedByGasClass',
    method: 'get',
    params
  })
}

/**
 * desc: 请求表格数据
 * param {type}
 * return: void
 */
export const fetchDownTableData = (params) => {
  return axios.request({
    url: '/api/cycle/getMeterPeriodPagedByGasClass',
    method: 'get',
    params
  })
}
